<!DOCTYPE html>
<html lang="zh" dir="ltr">
<head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#ffffff">
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#343a40">
<meta name="color-scheme" content="light dark"><meta property="og:url" content="//localhost:1313/categories/golang.html">
  <meta property="og:site_name" content="神马中转API">
  <meta property="og:title" content="Golang">
  <meta property="og:locale" content="zh">
  <meta property="og:type" content="website">
<title>Golang | 神马中转API</title>
<link rel="icon" href="/favicon.png" >
<link rel="manifest" href="/manifest.json">
<link rel="canonical" href="//localhost:1313/categories/golang.html">
<link rel="stylesheet" href="/book.min.27cffe658670f57112663ed746a421db277c2dd6549965c27f9ad0103cccd990.css" integrity="sha256-J8/&#43;ZYZw9XESZj7XRqQh2yd8LdZUmWXCf5rQEDzM2ZA=" crossorigin="anonymous">
  <script defer src="/fuse.min.js"></script>
  <script defer src="/zh.search.min.0456d2ce9f5ecd0be1d3b1f7921be62a56e64fe7f4ce7b20a3423b88b24e924c.js" integrity="sha256-BFbSzp9ezQvh07H3khvmKlbmT&#43;f0znsgo0I7iLJOkkw=" crossorigin="anonymous"></script>

  <script defer src="/sw.min.6f6f90fcb8eb1c49ec389838e6b801d0de19430b8e516902f8d75c3c8bd98739.js" integrity="sha256-b2&#43;Q/LjrHEnsOJg45rgB0N4ZQwuOUWkC&#43;NdcPIvZhzk=" crossorigin="anonymous"></script>
<link rel="alternate" type="application/rss+xml" href="//localhost:1313/categories/golang/index.xml" title="神马中转API" />
<!--
Made with Book Theme
https://github.com/alex-shpak/hugo-book
-->
  
</head>
<body dir="ltr" class="book-kind-term book-type-categories book-layout-">
  <input type="checkbox" class="hidden toggle" id="menu-control" />
  <input type="checkbox" class="hidden toggle" id="toc-control" />
  <main class="container flex">
    
<aside class="book-menu">
  <div class="book-menu-content">
    
  <nav>
<h2 class="book-brand">
  <a class="flex align-center" href="/index.html"><span>神马中转API</span>
  </a>
</h2>


<div class="book-search hidden">
  <input type="text" id="book-search-input" placeholder="搜索" aria-label="搜索" maxlength="64" data-hotkeys="s/" />
  <div class="book-search-spinner hidden"></div>
  <ul id="book-search-results"></ul>
</div>
<script>document.querySelector(".book-search").classList.remove("hidden")</script>















  
  <ul>
    
      
        <li class="book-section-flat" >
          
  
  

  
    <a href="/docs/example/index.html" class="">Example Site</a>
  

          
  <ul>
    
      
        <li>
          
  
  

  
    <a href="/docs/example/table-of-contents/index.html" class="">Table of Contents</a>
  

          
  <ul>
    
      
        <li>
          
  
  

  
    <a href="/docs/example/table-of-contents/With-ToC.html.html" class="">With ToC</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/example/table-of-contents/Without-ToC.html.html" class="">Without ToC</a>
  

        </li>
      
    
  </ul>

        </li>
      
    
      
        <li>
          
  
  

  
    <input type="checkbox" id="section-116a6035acc73224a51c969496c44370" class="toggle"  />
    <label for="section-116a6035acc73224a51c969496c44370" class="flex">
      <a role="button" class="flex-auto ">Collapsed</a>
    </label>
  

          
  <ul>
    
      
        <li>
          
  
  

  
    <a href="/docs/example/collapsed/3rd-level/index.html" class="">3rd Level</a>
  

          
  <ul>
    
      
        <li>
          
  
  

  
    <a href="/docs/example/collapsed/3rd-level/.html.html" class="">4th Level</a>
  

        </li>
      
    
  </ul>

        </li>
      
    
  </ul>

        </li>
      
    
  </ul>

        </li>
      
    
      
        <li>
          
  
  

  
    <input type="checkbox" id="section-b781af25ad1a598c776fa6827868c0ce" class="toggle"  />
    <label for="section-b781af25ad1a598c776fa6827868c0ce" class="flex">
      <a role="button" class="flex-auto ">基本概念</a>
    </label>
  

          
  <ul>
    
      
        <li>
          
  
  

  
    <a href="/docs/aidocs/api.html.html" class="">基本概念-API地址（BaseURL）</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/aidocs/.html.html" class="">Base</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/aidocs/.html.html" class="">Group</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/aidocs/.html.html" class="">Key</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/aidocs/.html.html" class="">Pay1</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/aidocs/.html.html" class="">Pay2</a>
  

        </li>
      
    
  </ul>

        </li>
      
    
      
        <li class="book-section-flat" >
          
  
  

  
    <span>Shortcodes</span>
  

          
  <ul>
    
      
        <li>
          
  
  

  
    <a href="/docs/shortcodes/.html.html" class="">Badges</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/shortcodes/.html.html" class="">Buttons</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/shortcodes/.html.html" class="">Cards</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/shortcodes/.html.html" class="">Columns</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/shortcodes/.html.html" class="">Details</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/shortcodes/.html.html" class="">Hints</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/shortcodes/.html.html" class="">Images</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/shortcodes/.html.html" class="">Mermaid</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/shortcodes/.html.html" class="">Steps</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/shortcodes/.html.html" class="">Tabs</a>
  

        </li>
      
    
      
        <li>
          
  
  

  
    <a href="/docs/shortcodes/KaTeX.html.html" class="">KaTeX</a>
  

        </li>
      
    
  </ul>

        </li>
      
    
  </ul>










  
<ul>
  
  <li>
    
    <a href="/posts/index.html"  >
        Blog
      </a>
  </li>
  
</ul>






</nav>




  <script>(function(){var e=document.querySelector("aside .book-menu-content");addEventListener("beforeunload",function(){localStorage.setItem("menu.scrollTop",e.scrollTop)}),e.scrollTop=localStorage.getItem("menu.scrollTop")})()</script>



  </div>
</aside>
 

    <div class="book-page">
      <header class="book-header">
        
  <div class="flex align-center justify-between">
  <label for="menu-control">
    <img src="/svg/menu.svg" class="book-icon" alt="Menu" />
  </label>

  <h3>Golang</h3>

  <label for="toc-control">
    
  </label>
</div>


  
  <aside class="hidden clearfix">
    
  <nav>
  <ul>
  
    
    <li class="book-section-flat">
      <span>Categories</span>
      <ul>
      
        <li class="flex justify-between">
          <a href="/categories/Development.html">Development</a>
          <span>2</span>
        </li>
      
        <li class="flex justify-between">
          <a href="/categories/golang.html">Golang</a>
          <span>2</span>
        </li>
      
      </ul>
    </li>
    
  
    
    <li class="book-section-flat">
      <span>Tags</span>
      <ul>
      
        <li class="flex justify-between">
          <a href="/tags/development.html">Development</a>
          <span>2</span>
        </li>
      
        <li class="flex justify-between">
          <a href="/tags/go.html">Go</a>
          <span>2</span>
        </li>
      
        <li class="flex justify-between">
          <a href="/tags/golang.html">Golang</a>
          <span>2</span>
        </li>
      
        <li class="flex justify-between">
          <a href="/tags/hugo.html">Hugo</a>
          <span>1</span>
        </li>
      
        <li class="flex justify-between">
          <a href="/tags/templates.html">Templates</a>
          <span>1</span>
        </li>
      
        <li class="flex justify-between">
          <a href="/tags/themes.html">Themes</a>
          <span>1</span>
        </li>
      
      </ul>
    </li>
    
  
  </ul>
</nav>


  </aside>
  
 
      </header>

      
      
  
  <article class="markdown book-post">
    <h2>
      <a href="/posts/goisforlovers.html">(Hu)go Template Primer</a>
    </h2>
    
  <div class="flex align-center text-small book-post-date">
    <img src="/svg/calendar.svg" class="book-icon " alt="" />
    <span>四月 2, 2014</span>
  </div>



  
  <div class="text-small">
    
      <a href="/categories/Development.html">Development</a>, 
      <a href="/categories/golang.html">Golang</a>
  </div>
  

  
  <div class="text-small">
    
      <a href="/tags/go.html">Go</a>, 
      <a href="/tags/golang.html">Golang</a>, 
      <a href="/tags/templates.html">Templates</a>, 
      <a href="/tags/themes.html">Themes</a>, 
      <a href="/tags/development.html">Development</a>
  </div>
  


    <div class="book-post-content"><p>Hugo uses the excellent <a href="https://golang.org/">Go</a> <a href="https://golang.org/pkg/html/template/">html/template</a> library for
its template engine. It is an extremely lightweight engine that provides a very
small amount of logic. In our experience that it is just the right amount of
logic to be able to create a good static website. If you have used other
template systems from different languages or frameworks you will find a lot of
similarities in Go templates.</p>
<p>This document is a brief primer on using Go templates. The <a href="https://golang.org/pkg/html/template/">Go docs</a>
provide more details.</p></div>
  </article>
  
  <article class="markdown book-post">
    <h2>
      <a href="/posts/hugoisforlovers.html">Getting Started with Hugo</a>
    </h2>
    
  <div class="flex align-center text-small book-post-date">
    <img src="/svg/calendar.svg" class="book-icon " alt="" />
    <span>四月 2, 2014</span>
  </div>



  
  <div class="text-small">
    
      <a href="/categories/Development.html">Development</a>, 
      <a href="/categories/golang.html">Golang</a>
  </div>
  

  
  <div class="text-small">
    
      <a href="/tags/go.html">Go</a>, 
      <a href="/tags/golang.html">Golang</a>, 
      <a href="/tags/hugo.html">Hugo</a>, 
      <a href="/tags/development.html">Development</a>
  </div>
  


    <div class="book-post-content"><h2 id="step-1-install-hugo">
  Step 1. Install Hugo
  
  <a class="anchor" href="#step-1-install-hugo">#</a>
  
</h2>
<p>Go to <a href="https://github.com/spf13/hugo/releases">Hugo releases</a> and download the
appropriate version for your OS and architecture.</p>
<p>Save it somewhere specific as we will be using it in the next step.</p>
<p>More complete instructions are available at <a href="https://gohugo.io/getting-started/installing/">Install Hugo</a></p>
<h2 id="step-2-build-the-docs">
  Step 2. Build the Docs
  
  <a class="anchor" href="#step-2-build-the-docs">#</a>
  
</h2>
<p>Hugo has its own example site which happens to also be the documentation site
you are reading right now.</p>
<p>Follow the following steps:</p></div>
  </article>
  

  
 
      

      <footer class="book-footer">
        
  <div class="flex flex-wrap justify-between">





</div>





  
  
  




  <script>(function(){function e(e){const t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}document.querySelectorAll("pre code").forEach(t=>{t.addEventListener("click",function(){if(window.getSelection().toString())return;e(t.parentElement),navigator.clipboard&&navigator.clipboard.writeText(t.parentElement.textContent)})})})()</script>


 
        
      </footer>

      
  
 
      <label for="menu-control" class="hidden book-menu-overlay"></label>
    </div>

    
<aside class="book-toc">
  <div class="book-toc-content">
    
  <nav>
  <ul>
  
    
    <li class="book-section-flat">
      <span>Categories</span>
      <ul>
      
        <li class="flex justify-between">
          <a href="/categories/Development.html">Development</a>
          <span>2</span>
        </li>
      
        <li class="flex justify-between">
          <a href="/categories/golang.html">Golang</a>
          <span>2</span>
        </li>
      
      </ul>
    </li>
    
  
    
    <li class="book-section-flat">
      <span>Tags</span>
      <ul>
      
        <li class="flex justify-between">
          <a href="/tags/development.html">Development</a>
          <span>2</span>
        </li>
      
        <li class="flex justify-between">
          <a href="/tags/go.html">Go</a>
          <span>2</span>
        </li>
      
        <li class="flex justify-between">
          <a href="/tags/golang.html">Golang</a>
          <span>2</span>
        </li>
      
        <li class="flex justify-between">
          <a href="/tags/hugo.html">Hugo</a>
          <span>1</span>
        </li>
      
        <li class="flex justify-between">
          <a href="/tags/templates.html">Templates</a>
          <span>1</span>
        </li>
      
        <li class="flex justify-between">
          <a href="/tags/themes.html">Themes</a>
          <span>1</span>
        </li>
      
      </ul>
    </li>
    
  
  </ul>
</nav>


  </div>
</aside>
 
  </main>

  
</body>
</html>
















